#define _CRT_SECURE_NO_WARNINGS 1


#include <stdio.h>

int main() {
    int a = 1;
    int b = 2;
    int c = 0;
    int n = 0;
    scanf("%d", &n);
    while (n > 2)
    {
        c = a + b;
        a = b;
        b = c;
        n--;

    }
    printf("%d", c);
    return 0;
}